<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue3 class-02</title>
  <link href="favicon.ico" rel="shortcut icon">
  <script src="../../js/vue.js"></script>
</head>

<body>
  <div id='app'>
    <todo-item></todo-item>
    <p>使用模板</p>
  </div>

  <script>
    const app = Vue.createApp({})
    // 定义名为 todo-item 的新组件
    app.component('todo-item', {
      template: `<li>This is a todo</li>`
    })
    app.mount('#app')
  </script>
</body>

</html>